package org.hongqi.common.senpec.sys.dictionary;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import jakarta.persistence.Entity;
import jakarta.persistence.Transient;
import lombok.*;
import org.hongqi.common.senpec.base.mybatisplus.IBaseEntity;

import java.util.Collection;

@EqualsAndHashCode(callSuper = true)
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Entity(name = "senpec_sys_dictionary")
@TableName("senpec_sys_dictionary")
public class Dictionary extends IBaseEntity<Dictionary> {
    private String team;
    private Long pid = 0L;
    private String label;
    private Integer sequence;   //顺序，当为0时，作为默认值
    private String type;   //包括：目录，名称和选项
    private Boolean isTail = false;//是否为兄弟中最后的元素
    @Transient
    @TableField(exist = false)
    private Collection<Dictionary> children;
}
